package com.kaikeba.bean;

import java.sql.Timestamp;
import java.util.Objects;

public class Courier {
    private String number;
    private String name;
    private String phoneNumber;
    private String idCardNum;
    private String password;
    private int sendExpressNum;
    private Timestamp registTime;
    private Timestamp lastLoginTime;

    public Courier(String name, String phoneNumber, String idCardNum, String password) {
        this.name = name;
        this.phoneNumber = phoneNumber;
        this.idCardNum = idCardNum;
        this.password = password;
    }

    @Override
    public String toString() {
        return "Courier{" +
                "number='" + number + '\'' +
                ", name='" + name + '\'' +
                ", phoneNumber='" + phoneNumber + '\'' +
                ", idCardNum='" + idCardNum + '\'' +
                ", password='" + password + '\'' +
                ", sendExpressNum=" + sendExpressNum +
                ", registTime=" + registTime +
                ", lastLoginTime=" + lastLoginTime +
                '}';
    }

    public Courier() {
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Courier courier = (Courier) o;
        return Objects.equals(idCardNum, courier.idCardNum);
    }

    @Override
    public int hashCode() {
        return Objects.hash(idCardNum);
    }

    public Courier(String number, String name, String phoneNumber, String idCardNum, String password, int sendExpressNum, Timestamp registTime, Timestamp lastLoginTime) {
        this.number = number;
        this.name = name;
        this.phoneNumber = phoneNumber;
        this.idCardNum = idCardNum;
        this.password = password;
        this.sendExpressNum = sendExpressNum;
        this.registTime = registTime;
        this.lastLoginTime = lastLoginTime;
    }

    public String getNumber() {
        return number;
    }

    public void setNumber(String number) {
        this.number = number;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPhoneNumber() {
        return phoneNumber;
    }

    public void setPhoneNumber(String phoneNumber) {
        this.phoneNumber = phoneNumber;
    }

    public String getIdCardNum() {
        return idCardNum;
    }

    public void setIdCardNum(String idCardNum) {
        this.idCardNum = idCardNum;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public int getSendExpressNum() {
        return sendExpressNum;
    }

    public void setSendExpressNum(int sendExpressNum) {
        this.sendExpressNum = sendExpressNum;
    }

    public Timestamp getRegistTime() {
        return registTime;
    }

    public void setRegistTime(Timestamp registTime) {
        this.registTime = registTime;
    }

    public Timestamp getLastLoginTime() {
        return lastLoginTime;
    }

    public void setLastLoginTime(Timestamp lastLoginTime) {
        this.lastLoginTime = lastLoginTime;
    }
}
